package org.aepscolombia.platform.models.entity;
// Generated Jan 13, 2014 2:36:33 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Diseases generated by hbm2java
 */
@Entity
@Table(name="diseases"
    ,catalog="madr_bd10"
)
public class Diseases  implements java.io.Serializable {


     private Integer idDis;
     private String nameDis;
     private boolean statusDis;
     private Set productionEventses = new HashSet(0);
     private Set controlses = new HashSet(0);
     private Set monitoringPads = new HashSet(0);
     private Set cropsTypeses = new HashSet(0);

    public Diseases() {
    }

	
    public Diseases(String nameDis, boolean statusDis) {
        this.nameDis = nameDis;
        this.statusDis = statusDis;
    }
    public Diseases(String nameDis, boolean statusDis, Set productionEventses, Set controlses, Set monitoringPads, Set cropsTypeses) {
       this.nameDis = nameDis;
       this.statusDis = statusDis;
       this.productionEventses = productionEventses;
       this.controlses = controlses;
       this.monitoringPads = monitoringPads;
       this.cropsTypeses = cropsTypeses;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id_dis", unique=true, nullable=false)
    public Integer getIdDis() {
        return this.idDis;
    }
    
    public void setIdDis(Integer idDis) {
        this.idDis = idDis;
    }
    
    @Column(name="name_dis", nullable=false, length=100)
    public String getNameDis() {
        return this.nameDis;
    }
    
    public void setNameDis(String nameDis) {
        this.nameDis = nameDis;
    }
    
    @Column(name="status_dis", nullable=false)
    public boolean isStatusDis() {
        return this.statusDis;
    }
    
    public void setStatusDis(boolean statusDis) {
        this.statusDis = statusDis;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="diseases")
    public Set getProductionEventses() {
        return this.productionEventses;
    }
    
    public void setProductionEventses(Set productionEventses) {
        this.productionEventses = productionEventses;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="diseases")
    public Set getControlses() {
        return this.controlses;
    }
    
    public void setControlses(Set controlses) {
        this.controlses = controlses;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="diseases")
    public Set getMonitoringPads() {
        return this.monitoringPads;
    }
    
    public void setMonitoringPads(Set monitoringPads) {
        this.monitoringPads = monitoringPads;
    }
@ManyToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    @JoinTable(name="diseases_crops_types", catalog="madr_bd10", joinColumns = { 
        @JoinColumn(name="id_disease_dis_cro_typ", nullable=false, updatable=false) }, inverseJoinColumns = { 
        @JoinColumn(name="id_crop_type_dis_cro_typ", nullable=false, updatable=false) })
    public Set getCropsTypeses() {
        return this.cropsTypeses;
    }
    
    public void setCropsTypeses(Set cropsTypeses) {
        this.cropsTypeses = cropsTypeses;
    }




}


